import { IsDefined, IsNotEmptyObject } from "class-validator";
import { Transform } from 'class-transformer';
import { BaseDto, BaseQueryDto } from "@/dtos/base.dto";
import { Prisma } from '@prisma/client';

// export class AutotradingTestDto {
//   @IsDefined({ message: 'ID必填' })
//   @Transform(({ value }) => Number(value))
//   id: number;
// }

export class AssetAutoTradingCreateDto extends BaseDto<Prisma.AssetAutoTradingCreateInput> {}
export class AssetAutoTradingQueryDto extends BaseQueryDto<Prisma.AssetAutoTradingWhereUniqueInput> {}

export class AssetAutoTradingUpdateDto extends BaseDto<Prisma.AssetAutoTradingUpdateInput> {
  @IsDefined({ message: '条件必填' })
  @IsNotEmptyObject({ nullable: false }, { message: '条件参数必填' })
  where: Prisma.AssetAutoTradingWhereUniqueInput;
}
